Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get os_family for RPM distros from the RPM macros #49930

Merged
merged 3 commits into from Oct 9, 2018

Conversation

isbm
Copy link
Contributor

@isbm isbm commented Oct 8, 2018

What issues does this PR fix or reference?

Bugfix: sometimes uname -m is not what RPM macros returns. Therefore copying cpuarch over osarch is not the best idea, as it results to unwanted effects while installing packages on less used systems (ARM for example).

It is also that original get_osarch function returns bytes type with the os.linesep attached alongside Unicode string.

Tests written?

No, should just apply existing

@isbm
Copy link
Contributor Author

isbm commented Oct 8, 2018

@rallytime this should be forwarded to develop too.

Copy link
Contributor

@brejoc brejoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rallytime rallytime closed this Oct 8, 2018
@rallytime rallytime reopened this Oct 8, 2018
@Poil
Copy link

Poil commented Oct 9, 2018

Why not use the standard platform library from python ? Any case where we have a 32 bit interpreter on a 64 bit OS ?

@isbm
Copy link
Contributor Author

isbm commented Oct 9, 2018

@Poil because I explained this in the description of the bug: uname -m is what Python's platform is doing and it is cpuarch. And on some platforms it returns different name than RPM database. In other words, osarch and cpuarch may differ. And the bug is when osarch is just copied cpuarch and therefore packages cannot be properly installed anymore.

@rallytime rallytime merged commit a30c053 into saltstack:2018.3 Oct 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants